home *** CD-ROM | disk | FTP | other *** search
/ Sky at Night 2007 June / SAN CD 6-2007 CD-ROM 25.iso / pc / Software / AstroGrav_Win / Java / jre1.6.0 / lib / rt.jar / java / io / ObjectOutputStream.class (.txt) < prev    next >
Encoding:
Java Class File  |  2006-11-29  |  13.7 KB  |  736 lines

  1. package java.io;
  2.  
  3. import java.security.AccessController;
  4. import sun.security.action.GetBooleanAction;
  5.  
  6. public class ObjectOutputStream extends OutputStream implements ObjectOutput, ObjectStreamConstants {
  7.    private final BlockDataOutputStream bout;
  8.    private final HandleTable handles;
  9.    private final ReplaceTable subs;
  10.    private int protocol = 2;
  11.    private int depth;
  12.    private byte[] primVals;
  13.    private final boolean enableOverride;
  14.    private boolean enableReplace;
  15.    private Object curObj;
  16.    private ObjectStreamClass curDesc;
  17.    private PutFieldImpl curPut;
  18.    private final DebugTraceInfoStack debugInfoStack;
  19.    private static final boolean extendedDebugInfo = (Boolean)AccessController.doPrivileged(new GetBooleanAction("sun.io.serialization.extendedDebugInfo"));
  20.  
  21.    public ObjectOutputStream(OutputStream var1) throws IOException {
  22.       this.verifySubclass();
  23.       this.bout = new BlockDataOutputStream(var1);
  24.       this.handles = new HandleTable(10, 3.0F);
  25.       this.subs = new ReplaceTable(10, 3.0F);
  26.       this.enableOverride = false;
  27.       this.writeStreamHeader();
  28.       this.bout.setBlockDataMode(true);
  29.       if (extendedDebugInfo) {
  30.          this.debugInfoStack = new DebugTraceInfoStack();
  31.       } else {
  32.          this.debugInfoStack = null;
  33.       }
  34.  
  35.    }
  36.  
  37.    protected ObjectOutputStream() throws IOException, SecurityException {
  38.       SecurityManager var1 = System.getSecurityManager();
  39.       if (var1 != null) {
  40.          var1.checkPermission(SUBCLASS_IMPLEMENTATION_PERMISSION);
  41.       }
  42.  
  43.       this.bout = null;
  44.       this.handles = null;
  45.       this.subs = null;
  46.       this.enableOverride = true;
  47.       this.debugInfoStack = null;
  48.    }
  49.  
  50.    public void useProtocolVersion(int var1) throws IOException {
  51.       if (this.handles.size() != 0) {
  52.          throw new IllegalStateException("stream non-empty");
  53.       } else {
  54.          switch (var1) {
  55.             case 1:
  56.             case 2:
  57.                this.protocol = var1;
  58.                return;
  59.             default:
  60.                throw new IllegalArgumentException("unknown version: " + var1);
  61.          }
  62.       }
  63.    }
  64.  
  65.    public final void writeObject(Object var1) throws IOException {
  66.       if (this.enableOverride) {
  67.          this.writeObjectOverride(var1);
  68.       } else {
  69.          try {
  70.             this.writeObject0(var1, false);
  71.          } catch (IOException var3) {
  72.             if (this.depth == 0) {
  73.                this.writeFatalException(var3);
  74.             }
  75.  
  76.             throw var3;
  77.          }
  78.       }
  79.    }
  80.  
  81.    protected void writeObjectOverride(Object var1) throws IOException {
  82.    }
  83.  
  84.    public void writeUnshared(Object var1) throws IOException {
  85.       try {
  86.          this.writeObject0(var1, true);
  87.       } catch (IOException var3) {
  88.          if (this.depth == 0) {
  89.             this.writeFatalException(var3);
  90.          }
  91.  
  92.          throw var3;
  93.       }
  94.    }
  95.  
  96.    public void defaultWriteObject() throws IOException {
  97.       if (this.curObj != null && this.curDesc != null) {
  98.          this.bout.setBlockDataMode(false);
  99.          this.defaultWriteFields(this.curObj, this.curDesc);
  100.          this.bout.setBlockDataMode(true);
  101.       } else {
  102.          throw new NotActiveException("not in call to writeObject");
  103.       }
  104.    }
  105.  
  106.    public PutField putFields() throws IOException {
  107.       if (this.curPut == null) {
  108.          if (this.curObj == null || this.curDesc == null) {
  109.             throw new NotActiveException("not in call to writeObject");
  110.          }
  111.  
  112.          this.curPut = new PutFieldImpl(this, this.curDesc);
  113.       }
  114.  
  115.       return this.curPut;
  116.    }
  117.  
  118.    public void writeFields() throws IOException {
  119.       if (this.curPut == null) {
  120.          throw new NotActiveException("no current PutField object");
  121.       } else {
  122.          this.bout.setBlockDataMode(false);
  123.          this.curPut.writeFields();
  124.          this.bout.setBlockDataMode(true);
  125.       }
  126.    }
  127.  
  128.    public void reset() throws IOException {
  129.       if (this.depth != 0) {
  130.          throw new IOException("stream active");
  131.       } else {
  132.          this.bout.setBlockDataMode(false);
  133.          this.bout.writeByte(121);
  134.          this.clear();
  135.          this.bout.setBlockDataMode(true);
  136.       }
  137.    }
  138.  
  139.    protected void annotateClass(Class<?> var1) throws IOException {
  140.    }
  141.  
  142.    protected void annotateProxyClass(Class<?> var1) throws IOException {
  143.    }
  144.  
  145.    protected Object replaceObject(Object var1) throws IOException {
  146.       return var1;
  147.    }
  148.  
  149.    protected boolean enableReplaceObject(boolean var1) throws SecurityException {
  150.       if (var1 == this.enableReplace) {
  151.          return var1;
  152.       } else {
  153.          if (var1) {
  154.             SecurityManager var2 = System.getSecurityManager();
  155.             if (var2 != null) {
  156.                var2.checkPermission(SUBSTITUTION_PERMISSION);
  157.             }
  158.          }
  159.  
  160.          this.enableReplace = var1;
  161.          return !this.enableReplace;
  162.       }
  163.    }
  164.  
  165.    protected void writeStreamHeader() throws IOException {
  166.       this.bout.writeShort(-21267);
  167.       this.bout.writeShort(5);
  168.    }
  169.  
  170.    protected void writeClassDescriptor(ObjectStreamClass var1) throws IOException {
  171.       var1.writeNonProxy(this);
  172.    }
  173.  
  174.    public void write(int var1) throws IOException {
  175.       this.bout.write(var1);
  176.    }
  177.  
  178.    public void write(byte[] var1) throws IOException {
  179.       this.bout.write(var1, 0, var1.length, false);
  180.    }
  181.  
  182.    public void write(byte[] var1, int var2, int var3) throws IOException {
  183.       if (var1 == null) {
  184.          throw new NullPointerException();
  185.       } else {
  186.          int var4 = var2 + var3;
  187.          if (var2 >= 0 && var3 >= 0 && var4 <= var1.length && var4 >= 0) {
  188.             this.bout.write(var1, var2, var3, false);
  189.          } else {
  190.             throw new IndexOutOfBoundsException();
  191.          }
  192.       }
  193.    }
  194.  
  195.    public void flush() throws IOException {
  196.       this.bout.flush();
  197.    }
  198.  
  199.    protected void drain() throws IOException {
  200.       this.bout.drain();
  201.    }
  202.  
  203.    public void close() throws IOException {
  204.       this.flush();
  205.       this.clear();
  206.       this.bout.close();
  207.    }
  208.  
  209.    public void writeBoolean(boolean var1) throws IOException {
  210.       this.bout.writeBoolean(var1);
  211.    }
  212.  
  213.    public void writeByte(int var1) throws IOException {
  214.       this.bout.writeByte(var1);
  215.    }
  216.  
  217.    public void writeShort(int var1) throws IOException {
  218.       this.bout.writeShort(var1);
  219.    }
  220.  
  221.    public void writeChar(int var1) throws IOException {
  222.       this.bout.writeChar(var1);
  223.    }
  224.  
  225.    public void writeInt(int var1) throws IOException {
  226.       this.bout.writeInt(var1);
  227.    }
  228.  
  229.    public void writeLong(long var1) throws IOException {
  230.       this.bout.writeLong(var1);
  231.    }
  232.  
  233.    public void writeFloat(float var1) throws IOException {
  234.       this.bout.writeFloat(var1);
  235.    }
  236.  
  237.    public void writeDouble(double var1) throws IOException {
  238.       this.bout.writeDouble(var1);
  239.    }
  240.  
  241.    public void writeBytes(String var1) throws IOException {
  242.       this.bout.writeBytes(var1);
  243.    }
  244.  
  245.    public void writeChars(String var1) throws IOException {
  246.       this.bout.writeChars(var1);
  247.    }
  248.  
  249.    public void writeUTF(String var1) throws IOException {
  250.       this.bout.writeUTF(var1);
  251.    }
  252.  
  253.    int getProtocolVersion() {
  254.       return this.protocol;
  255.    }
  256.  
  257.    void writeTypeString(String var1) throws IOException {
  258.       if (var1 == null) {
  259.          this.writeNull();
  260.       } else {
  261.          int var2;
  262.          if ((var2 = this.handles.lookup(var1)) != -1) {
  263.             this.writeHandle(var2);
  264.          } else {
  265.             this.writeString(var1, false);
  266.          }
  267.       }
  268.  
  269.    }
  270.  
  271.    private void verifySubclass() {
  272.       Class var1 = this.getClass();
  273.       if (var1 != ObjectOutputStream.class) {
  274.          SecurityManager var2 = System.getSecurityManager();
  275.          if (var2 != null) {
  276.             ObjectStreamClass.processQueue(java.io.ObjectOutputStream.Caches.subclassAuditsQueue, java.io.ObjectOutputStream.Caches.subclassAudits);
  277.             ObjectStreamClass.WeakClassKey var3 = new ObjectStreamClass.WeakClassKey(var1, java.io.ObjectOutputStream.Caches.subclassAuditsQueue);
  278.             Boolean var4 = (Boolean)java.io.ObjectOutputStream.Caches.subclassAudits.get(var3);
  279.             if (var4 == null) {
  280.                var4 = auditSubclass(var1);
  281.                java.io.ObjectOutputStream.Caches.subclassAudits.putIfAbsent(var3, var4);
  282.             }
  283.  
  284.             if (!var4) {
  285.                var2.checkPermission(SUBCLASS_IMPLEMENTATION_PERMISSION);
  286.             }
  287.          }
  288.       }
  289.    }
  290.  
  291.    private static boolean auditSubclass(Class var0) {
  292.       Boolean var1 = (Boolean)AccessController.doPrivileged(new 1(var0));
  293.       return var1;
  294.    }
  295.  
  296.    private void clear() {
  297.       this.subs.clear();
  298.       this.handles.clear();
  299.    }
  300.  
  301.    private void writeObject0(Object var1, boolean var2) throws IOException {
  302.       boolean var3 = this.bout.setBlockDataMode(false);
  303.       ++this.depth;
  304.  
  305.       try {
  306.          if ((var1 = this.subs.lookup(var1)) != null) {
  307.             int var4;
  308.             if (!var2 && (var4 = this.handles.lookup(var1)) != -1) {
  309.                this.writeHandle(var4);
  310.                return;
  311.             }
  312.  
  313.             if (var1 instanceof Class) {
  314.                this.writeClass((Class)var1, var2);
  315.                return;
  316.             }
  317.  
  318.             if (var1 instanceof ObjectStreamClass) {
  319.                this.writeClassDesc((ObjectStreamClass)var1, var2);
  320.                return;
  321.             }
  322.  
  323.             Object var5 = var1;
  324.             Class var6 = var1.getClass();
  325.  
  326.             while(true) {
  327.                ObjectStreamClass var7 = ObjectStreamClass.lookup(var6, true);
  328.                Class var8;
  329.                if (!var7.hasWriteReplaceMethod() || (var1 = var7.invokeWriteReplace(var1)) == null || (var8 = var1.getClass()) == var6) {
  330.                   if (this.enableReplace) {
  331.                      Object var14 = this.replaceObject(var1);
  332.                      if (var14 != var1 && var14 != null) {
  333.                         var6 = var14.getClass();
  334.                         var7 = ObjectStreamClass.lookup(var6, true);
  335.                      }
  336.  
  337.                      var1 = var14;
  338.                   }
  339.  
  340.                   if (var1 != var5) {
  341.                      this.subs.assign(var5, var1);
  342.                      if (var1 == null) {
  343.                         this.writeNull();
  344.                         return;
  345.                      }
  346.  
  347.                      if (!var2 && (var4 = this.handles.lookup(var1)) != -1) {
  348.                         this.writeHandle(var4);
  349.                         return;
  350.                      }
  351.  
  352.                      if (var1 instanceof Class) {
  353.                         this.writeClass((Class)var1, var2);
  354.                         return;
  355.                      }
  356.  
  357.                      if (var1 instanceof ObjectStreamClass) {
  358.                         this.writeClassDesc((ObjectStreamClass)var1, var2);
  359.                         return;
  360.                      }
  361.                   }
  362.  
  363.                   if (var1 instanceof String) {
  364.                      this.writeString((String)var1, var2);
  365.                      return;
  366.                   } else if (var6.isArray()) {
  367.                      this.writeArray(var1, var7, var2);
  368.                      return;
  369.                   } else {
  370.                      if (var1 instanceof Enum) {
  371.                         this.writeEnum((Enum)var1, var7, var2);
  372.                      } else {
  373.                         if (!(var1 instanceof Serializable)) {
  374.                            if (extendedDebugInfo) {
  375.                               throw new NotSerializableException(var6.getName() + "\n" + this.debugInfoStack.toString());
  376.                            }
  377.  
  378.                            throw new NotSerializableException(var6.getName());
  379.                         }
  380.  
  381.                         this.writeOrdinaryObject(var1, var7, var2);
  382.                      }
  383.  
  384.                      return;
  385.                   }
  386.                }
  387.  
  388.                var6 = var8;
  389.             }
  390.          }
  391.  
  392.          this.writeNull();
  393.       } finally {
  394.          --this.depth;
  395.          this.bout.setBlockDataMode(var3);
  396.       }
  397.  
  398.    }
  399.  
  400.    private void writeNull() throws IOException {
  401.       this.bout.writeByte(112);
  402.    }
  403.  
  404.    private void writeHandle(int var1) throws IOException {
  405.       this.bout.writeByte(113);
  406.       this.bout.writeInt(8257536 + var1);
  407.    }
  408.  
  409.    private void writeClass(Class var1, boolean var2) throws IOException {
  410.       this.bout.writeByte(118);
  411.       this.writeClassDesc(ObjectStreamClass.lookup(var1, true), false);
  412.       this.handles.assign(var2 ? null : var1);
  413.    }
  414.  
  415.    private void writeClassDesc(ObjectStreamClass var1, boolean var2) throws IOException {
  416.       if (var1 == null) {
  417.          this.writeNull();
  418.       } else {
  419.          int var3;
  420.          if (!var2 && (var3 = this.handles.lookup(var1)) != -1) {
  421.             this.writeHandle(var3);
  422.          } else if (var1.isProxy()) {
  423.             this.writeProxyDesc(var1, var2);
  424.          } else {
  425.             this.writeNonProxyDesc(var1, var2);
  426.          }
  427.       }
  428.  
  429.    }
  430.  
  431.    private void writeProxyDesc(ObjectStreamClass var1, boolean var2) throws IOException {
  432.       this.bout.writeByte(125);
  433.       this.handles.assign(var2 ? null : var1);
  434.       Class var3 = var1.forClass();
  435.       Class[] var4 = var3.getInterfaces();
  436.       this.bout.writeInt(var4.length);
  437.  
  438.       for(int var5 = 0; var5 < var4.length; ++var5) {
  439.          this.bout.writeUTF(var4[var5].getName());
  440.       }
  441.  
  442.       this.bout.setBlockDataMode(true);
  443.       this.annotateProxyClass(var3);
  444.       this.bout.setBlockDataMode(false);
  445.       this.bout.writeByte(120);
  446.       this.writeClassDesc(var1.getSuperDesc(), false);
  447.    }
  448.  
  449.    private void writeNonProxyDesc(ObjectStreamClass var1, boolean var2) throws IOException {
  450.       this.bout.writeByte(114);
  451.       this.handles.assign(var2 ? null : var1);
  452.       if (this.protocol == 1) {
  453.          var1.writeNonProxy(this);
  454.       } else {
  455.          this.writeClassDescriptor(var1);
  456.       }
  457.  
  458.       Class var3 = var1.forClass();
  459.       this.bout.setBlockDataMode(true);
  460.       this.annotateClass(var3);
  461.       this.bout.setBlockDataMode(false);
  462.       this.bout.writeByte(120);
  463.       this.writeClassDesc(var1.getSuperDesc(), false);
  464.    }
  465.  
  466.    private void writeString(String var1, boolean var2) throws IOException {
  467.       this.handles.assign(var2 ? null : var1);
  468.       long var3 = this.bout.getUTFLength(var1);
  469.       if (var3 <= 65535L) {
  470.          this.bout.writeByte(116);
  471.          this.bout.writeUTF(var1, var3);
  472.       } else {
  473.          this.bout.writeByte(124);
  474.          this.bout.writeLongUTF(var1, var3);
  475.       }
  476.  
  477.    }
  478.  
  479.    private void writeArray(Object var1, ObjectStreamClass var2, boolean var3) throws IOException {
  480.       this.bout.writeByte(117);
  481.       this.writeClassDesc(var2, false);
  482.       this.handles.assign(var3 ? null : var1);
  483.       Class var4 = var2.forClass().getComponentType();
  484.       if (var4.isPrimitive()) {
  485.          if (var4 == Integer.TYPE) {
  486.             int[] var5 = (int[])var1;
  487.             this.bout.writeInt(var5.length);
  488.             this.bout.writeInts(var5, 0, var5.length);
  489.          } else if (var4 == Byte.TYPE) {
  490.             byte[] var16 = (byte[])var1;
  491.             this.bout.writeInt(var16.length);
  492.             this.bout.write(var16, 0, var16.length, true);
  493.          } else if (var4 == Long.TYPE) {
  494.             long[] var17 = (long[])var1;
  495.             this.bout.writeInt(var17.length);
  496.             this.bout.writeLongs(var17, 0, var17.length);
  497.          } else if (var4 == Float.TYPE) {
  498.             float[] var18 = (float[])var1;
  499.             this.bout.writeInt(var18.length);
  500.             this.bout.writeFloats(var18, 0, var18.length);
  501.          } else if (var4 == Double.TYPE) {
  502.             double[] var19 = (double[])var1;
  503.             this.bout.writeInt(var19.length);
  504.             this.bout.writeDoubles(var19, 0, var19.length);
  505.          } else if (var4 == Short.TYPE) {
  506.             short[] var20 = (short[])var1;
  507.             this.bout.writeInt(var20.length);
  508.             this.bout.writeShorts(var20, 0, var20.length);
  509.          } else if (var4 == Character.TYPE) {
  510.             char[] var21 = (char[])var1;
  511.             this.bout.writeInt(var21.length);
  512.             this.bout.writeChars(var21, 0, var21.length);
  513.          } else {
  514.             if (var4 != Boolean.TYPE) {
  515.                throw new InternalError();
  516.             }
  517.  
  518.             boolean[] var22 = (boolean[])var1;
  519.             this.bout.writeInt(var22.length);
  520.             this.bout.writeBooleans(var22, 0, var22.length);
  521.          }
  522.       } else {
  523.          Object[] var23 = var1;
  524.          int var6 = var23.length;
  525.          this.bout.writeInt(var6);
  526.          if (extendedDebugInfo) {
  527.             this.debugInfoStack.push("array (class \"" + var1.getClass().getName() + "\", size: " + var6 + ")");
  528.          }
  529.  
  530.          try {
  531.             for(int var7 = 0; var7 < var6; ++var7) {
  532.                if (extendedDebugInfo) {
  533.                   this.debugInfoStack.push("element of array (index: " + var7 + ")");
  534.                }
  535.  
  536.                try {
  537.                   this.writeObject0(var23[var7], false);
  538.                } finally {
  539.                   if (extendedDebugInfo) {
  540.                      this.debugInfoStack.pop();
  541.                   }
  542.  
  543.                }
  544.             }
  545.          } finally {
  546.             if (extendedDebugInfo) {
  547.                this.debugInfoStack.pop();
  548.             }
  549.  
  550.          }
  551.       }
  552.  
  553.    }
  554.  
  555.    private void writeEnum(Enum var1, ObjectStreamClass var2, boolean var3) throws IOException {
  556.       this.bout.writeByte(126);
  557.       ObjectStreamClass var4 = var2.getSuperDesc();
  558.       this.writeClassDesc(var4.forClass() == Enum.class ? var2 : var4, false);
  559.       this.handles.assign(var3 ? null : var1);
  560.       this.writeString(var1.name(), false);
  561.    }
  562.  
  563.    private void writeOrdinaryObject(Object var1, ObjectStreamClass var2, boolean var3) throws IOException {
  564.       if (extendedDebugInfo) {
  565.          this.debugInfoStack.push((this.depth == 1 ? "root " : "") + "object (class \"" + var1.getClass().getName() + "\", " + var1.toString() + ")");
  566.       }
  567.  
  568.       try {
  569.          var2.checkSerialize();
  570.          this.bout.writeByte(115);
  571.          this.writeClassDesc(var2, false);
  572.          this.handles.assign(var3 ? null : var1);
  573.          if (var2.isExternalizable() && !var2.isProxy()) {
  574.             this.writeExternalData((Externalizable)var1);
  575.          } else {
  576.             this.writeSerialData(var1, var2);
  577.          }
  578.       } finally {
  579.          if (extendedDebugInfo) {
  580.             this.debugInfoStack.pop();
  581.          }
  582.  
  583.       }
  584.  
  585.    }
  586.  
  587.    private void writeExternalData(Externalizable var1) throws IOException {
  588.       Object var2 = this.curObj;
  589.       ObjectStreamClass var3 = this.curDesc;
  590.       PutFieldImpl var4 = this.curPut;
  591.       this.curObj = var1;
  592.       this.curDesc = null;
  593.       this.curPut = null;
  594.       if (extendedDebugInfo) {
  595.          this.debugInfoStack.push("writeExternal data");
  596.       }
  597.  
  598.       try {
  599.          if (this.protocol == 1) {
  600.             var1.writeExternal(this);
  601.          } else {
  602.             this.bout.setBlockDataMode(true);
  603.             var1.writeExternal(this);
  604.             this.bout.setBlockDataMode(false);
  605.             this.bout.writeByte(120);
  606.          }
  607.       } finally {
  608.          if (extendedDebugInfo) {
  609.             this.debugInfoStack.pop();
  610.          }
  611.  
  612.       }
  613.  
  614.       this.curObj = var2;
  615.       this.curDesc = var3;
  616.       this.curPut = var4;
  617.    }
  618.  
  619.    private void writeSerialData(Object var1, ObjectStreamClass var2) throws IOException {
  620.       ObjectStreamClass.ClassDataSlot[] var3 = var2.getClassDataLayout();
  621.  
  622.       for(int var4 = 0; var4 < var3.length; ++var4) {
  623.          ObjectStreamClass var5 = var3[var4].desc;
  624.          if (var5.hasWriteObjectMethod()) {
  625.             Object var6 = this.curObj;
  626.             ObjectStreamClass var7 = this.curDesc;
  627.             PutFieldImpl var8 = this.curPut;
  628.             this.curObj = var1;
  629.             this.curDesc = var5;
  630.             this.curPut = null;
  631.             if (extendedDebugInfo) {
  632.                this.debugInfoStack.push("custom writeObject data (class \"" + var5.getName() + "\")");
  633.             }
  634.  
  635.             try {
  636.                this.bout.setBlockDataMode(true);
  637.                var5.invokeWriteObject(var1, this);
  638.                this.bout.setBlockDataMode(false);
  639.                this.bout.writeByte(120);
  640.             } finally {
  641.                if (extendedDebugInfo) {
  642.                   this.debugInfoStack.pop();
  643.                }
  644.  
  645.             }
  646.  
  647.             this.curObj = var6;
  648.             this.curDesc = var7;
  649.             this.curPut = var8;
  650.          } else {
  651.             this.defaultWriteFields(var1, var5);
  652.          }
  653.       }
  654.  
  655.    }
  656.  
  657.    private void defaultWriteFields(Object var1, ObjectStreamClass var2) throws IOException {
  658.       var2.checkDefaultSerialize();
  659.       int var3 = var2.getPrimDataSize();
  660.       if (this.primVals == null || this.primVals.length < var3) {
  661.          this.primVals = new byte[var3];
  662.       }
  663.  
  664.       var2.getPrimFieldValues(var1, this.primVals);
  665.       this.bout.write(this.primVals, 0, var3, false);
  666.       ObjectStreamField[] var4 = var2.getFields(false);
  667.       Object[] var5 = new Object[var2.getNumObjFields()];
  668.       int var6 = var4.length - var5.length;
  669.       var2.getObjFieldValues(var1, var5);
  670.  
  671.       for(int var7 = 0; var7 < var5.length; ++var7) {
  672.          if (extendedDebugInfo) {
  673.             this.debugInfoStack.push("field (class \"" + var2.getName() + "\", name: \"" + var4[var6 + var7].getName() + "\", type: \"" + var4[var6 + var7].getType() + "\")");
  674.          }
  675.  
  676.          try {
  677.             this.writeObject0(var5[var7], var4[var6 + var7].isUnshared());
  678.          } finally {
  679.             if (extendedDebugInfo) {
  680.                this.debugInfoStack.pop();
  681.             }
  682.  
  683.          }
  684.       }
  685.  
  686.    }
  687.  
  688.    private void writeFatalException(IOException var1) throws IOException {
  689.       this.clear();
  690.       boolean var2 = this.bout.setBlockDataMode(false);
  691.  
  692.       try {
  693.          this.bout.writeByte(123);
  694.          this.writeObject0(var1, false);
  695.          this.clear();
  696.       } finally {
  697.          this.bout.setBlockDataMode(var2);
  698.       }
  699.  
  700.    }
  701.  
  702.    private static native void floatsToBytes(float[] var0, int var1, byte[] var2, int var3, int var4);
  703.  
  704.    private static native void doublesToBytes(double[] var0, int var1, byte[] var2, int var3, int var4);
  705.  
  706.    // $FF: synthetic method
  707.    static BlockDataOutputStream access$000(ObjectOutputStream var0) {
  708.       return var0.bout;
  709.    }
  710.  
  711.    // $FF: synthetic method
  712.    static boolean access$100() {
  713.       return extendedDebugInfo;
  714.    }
  715.  
  716.    // $FF: synthetic method
  717.    static DebugTraceInfoStack access$200(ObjectOutputStream var0) {
  718.       return var0.debugInfoStack;
  719.    }
  720.  
  721.    // $FF: synthetic method
  722.    static void access$300(ObjectOutputStream var0, Object var1, boolean var2) throws IOException {
  723.       var0.writeObject0(var1, var2);
  724.    }
  725.  
  726.    // $FF: synthetic method
  727.    static void access$400(float[] var0, int var1, byte[] var2, int var3, int var4) {
  728.       floatsToBytes(var0, var1, var2, var3, var4);
  729.    }
  730.  
  731.    // $FF: synthetic method
  732.    static void access$500(double[] var0, int var1, byte[] var2, int var3, int var4) {
  733.       doublesToBytes(var0, var1, var2, var3, var4);
  734.    }
  735. }
  736.